One of several problems encountered in communications between data processing devices is that the data packets may be corrupted in transit. Various layered communications protocols are typically utilized to solve these data communications problems. In particular, the transport layer protocol is responsible for the reliable end-to-end transfer of data between systems and it is the primary protocol layer which detects and compensates for these corrupted packets. The method used in the standardized transport layer protocol (International Standard ISO IS/8073) for detection of corrupted packets was proposed originally by Fletcher [Fletcher, J., "An Arithmetic Checksum for Serial Transmissions" IEEE Transactions on Communications., Vol. COM-30, No. 1, January, 1982, pp. 247-252]. This method calculates an arithmetic checksum which is included in packets as they are transmitted in order that errors encountered during transmission may be detected as they are received. This disclosure relates to an improved method for calculating the checksum functions for protocols which utilize Fletcher's arithmetic type error checking functions. Other protocols which use the Fletcher checksum include the protocol for providing the connectionless-mode network service ISO IS 8473 and the Department of Defense Transmission Control Protocol/Internet Protocol (TCP/IP) used in the Arpanet.
Serial transmission of information between computers may be corrupted by errors resulting from hardware malfunctions and environmental disturbances. Various methods are typically used to detect the errors so that they may be recovered from, including checksum functions, product codes and cyclic redundancy checks. These methods provide various levels of protection. Use of the Fletcher checksum is particularly advantageous for general purpose standardized computer communications because the checksum can be easily implemented on high and low performance systems alike. Communications between high performance systems may benefit from an error detection method designed specifically for the high performance application. However the general purpose standardized checksum method is still desired, even in this case, in order to provide compatibility with low performance systems. It is generally recognized however, that the method for implementing the checksum can significantly impact the throughput performance of the communications system. Therefore it is advantageous to provide a method for high speed calculation of the checksum in order that the system throughput may be maintained.
In addition to the detection of errors, the data must be physically copied out of a computer system memory for purposes of transmission and copied into the memory for reception. A major problem in obtaining high communications system throughput is the processing overhead associated with performing operations such as copying and calculating the checksum that operate on each of the bytes of the packet. These two operations in particular are accomplished sequentially in the prior art, and as a result, with an additive time to completely process the packet. Prior art has suggested the benefit of combining software programs which calculate the checksum and perform copy functions. However these known methods are still very performance limiting as a result of using software driven general purpose processor instructions to accomplish the tasks.
Another performance limiting issue in the design of communications systems relates to the common and useful practice of assigning data to various discontiguous locations in the computer system memory. Although beneficial in terms of the optimal use of memory, this practice presents problems for high performance communications wherein the data to be transmitted in a given data communications packet may be contained in multiple data buffers. This further complicates the calculation of a checksum and the reading and writing of buffers for transmission and reception.